// TODO(jelbourn): Measure perf benefits for translate3d and will-change.
// TODO(jelbourn): Figure out if anchor hover underline actually happens in any browser.

@import 'button-base';

// TODO(kara): Replace attribute selectors with class selectors when possible
[md-button] {
  @extend %md-button-base;

  &[disabled]:hover {
    &.md-primary, &.md-accent, &.md-warn, &:hover {
      background-color: transparent;
    }
  }
}

[md-raised-button] {
  @extend %md-raised-button;
}

[md-fab] {
  @include md-fab($md-fab-size, $md-fab-padding);
}

[md-mini-fab] {
  @include md-fab($md-mini-fab-size, $md-mini-fab-padding);
}

[md-icon-button] {
  @extend %md-button-base;

  min-width: 0;
  padding: 0;

  width: $md-icon-button-size;
  height: $md-icon-button-size;

  line-height: $md-icon-button-line-height;
  border-radius: $md-icon-button-border-radius;

  .md-button-wrapper > * {
    vertical-align: middle;
  }
}

// Only flat buttons and icon buttons (not raised or fabs) have a hover style.
[md-button]:hover, [md-icon-button]:hover {
  // Use the same visual treatment for hover as for focus.
  @include md-button-focus();
}

// Applies a clearer border for high-contrast mode (a11y)
@media screen and (-ms-high-contrast: active) {
  .md-raised-button, .md-fab, .md-mini-fab {
    border: 1px solid #fff;
  }
}
